package com.zyz.service;
import org.springframework.stereotype.Service;

@Service
public class UserServiceD2 {
    public String getUserById(int id) {
        if (id <= 0) {
            throw new IllegalArgumentException("id不能小于等于0");
        }
        return "User" + id;
    }

    public String getUserProfile() {
        // 只有登录后才能访问
        return "用户资料信息";
    }
}
